<?php


namespace App\Admin\Forms\Settings;

use App\Setting;
use Encore\Admin\Widgets\Form;
use Illuminate\Http\Request;

class PatentSetting extends BaseForm
{
    public $title = '专利设置';
    protected $type = 'patent';
    public $settings = [
        'patent_s_ratio_show' => '显示经费资助',
        'patent_s_ratio1'     => '发明资助系数',
        'patent_s_ratio2'     => '新型利资助系数',
        'patent_s_ratio3'     => '外观利资助系数',
        'patent_s_ratio4'     => 'PCT利资助系数',
        'patent_s_ratio5'     => '国外利资助系数',
    ];

    public function form()
    {
        foreach ($this->settings as $slug => $label) {
            if ($slug == 'patent_s_ratio_show') {
                $this->radio($slug, $label)->options(['否', '是']);
            } else {
                $this->text($slug, $label);
            }
        }
        $this->disableReset();
    }
}
